Optimal. Leaf size=53 \[ \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {858, 223, 212,
272, 65, 214} \begin {gather*} \frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 212
Rule 214
Rule 223
Rule 272
Rule 858
Rubi steps
\begin {align*} \int \frac {A+B x}{x \sqrt {a+b x^2}} \, dx &=A \int \frac {1}{x \sqrt {a+b x^2}} \, dx+B \int \frac {1}{\sqrt {a+b x^2}} \, dx\\ &=\frac {1}{2} A \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )+B \text {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}+\frac {A \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{b}\\ &=\frac {B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )}{\sqrt {b}}-\frac {A \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 66, normalized size = 1.25 \begin {gather*} \frac {2 A \tanh ^{-1}\left (\frac {\sqrt {b} x-\sqrt {a+b x^2}}{\sqrt {a}}\right )}{\sqrt {a}}-\frac {B \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{\sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.11, size = 52, normalized size = 0.98
method | result | size |
default | \(\frac {B \ln \left (x \sqrt {b}+\sqrt {b \,x^{2}+a}\right )}{\sqrt {b}}-\frac {A \ln \left (\frac {2 a +2 \sqrt {a}\, \sqrt {b \,x^{2}+a}}{x}\right )}{\sqrt {a}}\) | \(52\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 33, normalized size = 0.62 \begin {gather*} \frac {B \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{\sqrt {b}} - \frac {A \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.86, size = 273, normalized size = 5.15 \begin {gather*} \left [\frac {B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, -\frac {2 \, B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {a} b \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right )}{2 \, a b}, \frac {2 \, A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) + B a \sqrt {b} \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right )}{2 \, a b}, -\frac {B a \sqrt {-b} \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - A \sqrt {-a} b \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right )}{a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.39, size = 99, normalized size = 1.87 \begin {gather*} - \frac {A \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )}}{\sqrt {a}} + B \left (\begin {cases} \frac {\sqrt {- \frac {a}{b}} \operatorname {asin}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b < 0 \\\frac {\sqrt {\frac {a}{b}} \operatorname {asinh}{\left (x \sqrt {\frac {b}{a}} \right )}}{\sqrt {a}} & \text {for}\: a > 0 \wedge b > 0 \\\frac {\sqrt {- \frac {a}{b}} \operatorname {acosh}{\left (x \sqrt {- \frac {b}{a}} \right )}}{\sqrt {- a}} & \text {for}\: b > 0 \wedge a < 0 \end {cases}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.95, size = 58, normalized size = 1.09 \begin {gather*} \frac {2 \, A \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - \frac {B \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right )}{\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.30, size = 42, normalized size = 0.79 \begin {gather*} \frac {B\,\ln \left (\sqrt {b}\,x+\sqrt {b\,x^2+a}\right )}{\sqrt {b}}-\frac {A\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )}{\sqrt {a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________